﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using Windows.Storage;

namespace EveryBookies.Common
{
    public interface ILocalData
    {

        void SaveData<T>(T data, string fileName);
        Task<T> LoadData<T>(string fileName);
        Task<bool> FileExists<T>(string fileName);
        bool DeleteData();
        string Serialize(object obj);
        T Deserialize<T>(string xml);
        void DeleteDataSave<T>(string fileName);
        /// <summary>
        /// Delete a file
        /// </summary>
        /// <param name="fileName">filename</param>
        /// <returns>True - success, False - failed</returns>
        Task<bool> DeleteFileAsync(string fileName);
    }
}
